package com.haima.sage.bigdata.api.service.impl;

import com.haima.sage.bigdata.api.dao.AppSystemRepository;
import com.haima.sage.bigdata.api.entity.AppSystem;
import com.haima.sage.bigdata.api.service.AppSystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

@Service
public class AppSystemServiceImpl implements AppSystemService {
    private final AppSystemRepository appSystemRepository;

    @Autowired
    public AppSystemServiceImpl(AppSystemRepository appSystemRepository) {
        this.appSystemRepository = appSystemRepository;
    }

    @Transactional(readOnly = true)
    @Override
    public Optional<AppSystem> findById(String id) {
        return this.appSystemRepository.findById(id);
    }
}
